{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# _*_ coding: utf-8 _*_\n",
    "# 模块导入\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "import os\n",
    "import matplotlib\n",
    "%matplotlib inline\n",
    "#指定默认字体  \n",
    "# matplotlib.use('qt4agg')\n",
    "matplotlib.rcParams['font.sans-serif'] = ['SimHei']   \n",
    "matplotlib.rcParams['font.family']='sans-serif'  \n",
    "#解决负号'-'显示为方块的问题  \n",
    "matplotlib.rcParams['axes.unicode_minus'] = True "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "SkinThickness : 32\n",
      "Insulin : 105\n",
      "BMI : 32.0\n",
      "Glucose : 99\n",
      "BloodPressure : 70\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "Text(0,0.5,u'Number of result')"
      ]
     },
     "execution_count": 84,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEGCAYAAABo25JHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAD5ZJREFUeJzt3X/wZXVdx/HnK5Bad41Qvm1hETHD\nmCgs4qJgiy0IJZWpoOL4A0VtG3OoGacmUbNgdDAzJyPRtgjRGSvM8bcm2oisCsRupuiMDFMBCoKr\nwK4LGCPz7o97YL989/vjrPu95yz7eT5m7nzPfd/zvfd9Z3a+r/2czzmfk6pCktSunxi7AUnSuAwC\nSWqcQSBJjTMIJKlxBoEkNc4gkKTGGQSS1DiDQJIaZxBIUuP2H7uBPg4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53GDIIdwIpuexVzRidVtRHYOHRTLUiyuarWjt2HNJf/Nscx\n5qGhLew8HLQGuHG8ViSpXWOOCD4CbEpyCHAacPyIvUhSs0YbEVTVdiYTxlcDJ1XVtrF6aZCH3LS3\n8t/mCFJVY/cgSRqRVxZLUuMMAkl7jSSrk2wau4/WGASNcVkP7a2SHARcyuQaIw3IIGiIy3poL3c/\ncCawfexGWmMQtGU9LuuhvVRVbffswXEYBG2Zu6zH6hF7kbSXMAjasuiyHpLa5B+Ctrish6RdeEFZ\nQ5L8NLAJ+He6ZT08JivJIGhMd4reqcCVVXXb2P1IGp9BIEmNc45AkhpnEEhS4wwCNS3JqiQfTvLF\nJJcmmfceHUmOSXLM0P1JQzAI1LpzgBuqah3wk8ALFtjvmO4h7XPGvEOZtDd4KvAP3fYXgeOS3FpV\nVyR5eVd/HPBcgCQvrapnJPkp4L3ALwB3MQmQ+7vaIcC3gbOBq4DvAvcBPwdcAny42+9A4ONVdcFU\nv6G0BEcEat2jgLu77XuAn567Q1WdC7wVeGtVPaMrbwC+2o0kPgQ8Efhd4OtV9WvADcArgEcCzweO\nBl7EJHjOBf6lqp4GPCfJY6b03aReDAK1bjuT5TZgshbT7JUvV+y6+4N+BfiPbvu9wLXAkcA1Xe1q\n4PHA7VW1A7iJyYghTEYYr05yRfeZh+zpl5D2hEGg1l3DZFVWgBOB7wEz3fNnztrvXib/uydJgG8C\nx3WvvR54FfAN4Piudnz3fD7XA6+rqvVMRhp37OF3kPaIQaDW/S2TezN8mckf+48C5yR5D/D9Wft9\nFjg9yZeYBMbfA8d2/6s/Fng/k7mGJyS5EjiCyUhhPm8F/qh7r2cCty/3l5J2h1cWS1LjHBFIUuMM\nAklqnEEgSY0zCCSpcQaBJDXOIJCkxhkEktS4/wdcbbkOHa5GKQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xbf12d30>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 1. 数据读取 & 数据探索\n",
    "data_file_path = os.path.join(os.path.abspath('.'),'data','diabetes.csv')\n",
    "data = pd.read_csv(data_file_path)\n",
    "data.head()\n",
    "# data.info()\n",
    "# data.isnull().sum()\n",
    "data.describe()\n",
    "# 根据任务提示，下面特征明显有缺失值\n",
    "# 特征SkinThickness(三头肌皮肤褶层厚度) \n",
    "# Insulin（2小时血清胰岛素含量）\n",
    "# BMI（体重）\n",
    "# Glucose\n",
    "# BloodPressure\n",
    "\n",
    "def data_filling(data, keys=None):\n",
    "    \"\"\"\n",
    "    将缺失值为0的数填充为该特征的众数\n",
    "    \"\"\"\n",
    "    keys = keys if keys else ['SkinThickness','Insulin','BMI','Glucose','BloodPressure']\n",
    "    for key in keys:\n",
    "        filling_index = data[key][data[key]==0].index    \n",
    "        mode_num = data[data[key]!=0][key].mode()[0]\n",
    "        data.loc[list(filling_index.values),key] = mode_num\n",
    "        print key, ':',mode_num\n",
    "    return data\n",
    "\n",
    "data = data_filling(data)\n",
    "\n",
    "# 查看各类样本分布是否均衡\n",
    "sns.countplot(data.Outcome)\n",
    "plt.xlabel('Outcome')\n",
    "plt.ylabel('Number of result')\n",
    "# Outcome结果为1的比较少"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Pregnancies</th>\n",
       "      <th>Glucose</th>\n",
       "      <th>BloodPressure</th>\n",
       "      <th>SkinThickness</th>\n",
       "      <th>Insulin</th>\n",
       "      <th>BMI</th>\n",
       "      <th>DiabetesPedigreeFunction</th>\n",
       "      <th>Age</th>\n",
       "      <th>Outcome</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>3.845052</td>\n",
       "      <td>121.539062</td>\n",
       "      <td>72.295573</td>\n",
       "      <td>29.994792</td>\n",
       "      <td>130.932292</td>\n",
       "      <td>32.450911</td>\n",
       "      <td>0.471876</td>\n",
       "      <td>33.240885</td>\n",
       "      <td>0.348958</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>3.369578</td>\n",
       "      <td>30.490660</td>\n",
       "      <td>12.106756</td>\n",
       "      <td>8.886506</td>\n",
       "      <td>88.700443</td>\n",
       "      <td>6.875366</td>\n",
       "      <td>0.331329</td>\n",
       "      <td>11.760232</td>\n",
       "      <td>0.476951</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>44.000000</td>\n",
       "      <td>24.000000</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>14.000000</td>\n",
       "      <td>18.200000</td>\n",
       "      <td>0.078000</td>\n",
       "      <td>21.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>99.000000</td>\n",
       "      <td>64.000000</td>\n",
       "      <td>25.000000</td>\n",
       "      <td>105.000000</td>\n",
       "      <td>27.500000</td>\n",
       "      <td>0.243750</td>\n",
       "      <td>24.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>3.000000</td>\n",
       "      <td>117.000000</td>\n",
       "      <td>72.000000</td>\n",
       "      <td>32.000000</td>\n",
       "      <td>105.000000</td>\n",
       "      <td>32.000000</td>\n",
       "      <td>0.372500</td>\n",
       "      <td>29.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>6.000000</td>\n",
       "      <td>140.250000</td>\n",
       "      <td>80.000000</td>\n",
       "      <td>32.000000</td>\n",
       "      <td>127.250000</td>\n",
       "      <td>36.600000</td>\n",
       "      <td>0.626250</td>\n",
       "      <td>41.000000</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>17.000000</td>\n",
       "      <td>199.000000</td>\n",
       "      <td>122.000000</td>\n",
       "      <td>99.000000</td>\n",
       "      <td>846.000000</td>\n",
       "      <td>67.100000</td>\n",
       "      <td>2.420000</td>\n",
       "      <td>81.000000</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       Pregnancies     Glucose  BloodPressure  SkinThickness     Insulin  \\\n",
       "count   768.000000  768.000000     768.000000     768.000000  768.000000   \n",
       "mean      3.845052  121.539062      72.295573      29.994792  130.932292   \n",
       "std       3.369578   30.490660      12.106756       8.886506   88.700443   \n",
       "min       0.000000   44.000000      24.000000       7.000000   14.000000   \n",
       "25%       1.000000   99.000000      64.000000      25.000000  105.000000   \n",
       "50%       3.000000  117.000000      72.000000      32.000000  105.000000   \n",
       "75%       6.000000  140.250000      80.000000      32.000000  127.250000   \n",
       "max      17.000000  199.000000     122.000000      99.000000  846.000000   \n",
       "\n",
       "              BMI  DiabetesPedigreeFunction         Age     Outcome  \n",
       "count  768.000000                768.000000  768.000000  768.000000  \n",
       "mean    32.450911                  0.471876   33.240885    0.348958  \n",
       "std      6.875366                  0.331329   11.760232    0.476951  \n",
       "min     18.200000                  0.078000   21.000000    0.000000  \n",
       "25%     27.500000                  0.243750   24.000000    0.000000  \n",
       "50%     32.000000                  0.372500   29.000000    0.000000  \n",
       "75%     36.600000                  0.626250   41.000000    1.000000  \n",
       "max     67.100000                  2.420000   81.000000    1.000000  "
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 查看填充结果\n",
    "data.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 195,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 数据平衡\n",
    "from sklearn.model_selection import train_test_split\n",
    "# 让 Outcome 为 0 的分类的样本个数等于 为1的样本个数\n",
    "type_num = len(data[data['Outcome'] == 1])\n",
    "clear_index = data[data['Outcome'] == 0].index[type_num:]\n",
    "# print type_num,len(clear_index)\n",
    "# print data.info()\n",
    "data = data.drop(clear_index, axis=0)\n",
    "# print data.info()\n",
    "# 剩余正样本，负样本各268个，共536个，原来768个，删掉232个\n",
    "y_train = data['Outcome']\n",
    "X_train = data.drop('Outcome',axis=1)\n",
    "X_train = np.array(X_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 196,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 数据标准化\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "ss_X = StandardScaler()\n",
    "X_train = ss_X.fit_transform(X_train)\n",
    "# 训练数据和测试数据分割\n",
    "X_train_part, X_val, y_train_part, y_val = train_test_split(X_train, y_train, train_size=0.8, random_state=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 263,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "********* Logistic回归 带参数 *********\n",
      "Best score:  -0.723880597015\n",
      "Best params:  {'penalty': 'l2', 'C': 0.01}\n",
      "*********************************************\n"
     ]
    }
   ],
   "source": [
    "# Logistic回归\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "from sklearn.metrics import log_loss # 评价指标\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "from sklearn.cross_validation import cross_val_score\n",
    "# 初始化 要调优的参数\n",
    "penaltys = ['l1','l2']\n",
    "C_s = [0.0001,0.001,0.01,0.1,1,10,100,1000]\n",
    "tuned_parameters = dict(penalty=penaltys, C=C_s)\n",
    "lr_penalty = LogisticRegression()\n",
    "grid = GridSearchCV(lr_penalty, tuned_parameters, cv=5, scoring='accuracy')  # CV交叉验证用于评估模型性能和进行参数调优（模型选择）\n",
    "grid.fit(X_train, y_train)\n",
    "\n",
    "from sklearn.metrics import confusion_matrix\n",
    "# print grid.cv_results_\n",
    "print '***'*3,'Logistic回归 带参数', '***'*3\n",
    "print 'Best score: ', -grid.best_score_\n",
    "print 'Best params: ', grid.best_params_\n",
    "# y_predict_log = grid.predict(X_val)\n",
    "# print '矩阵:\\n{}\\n'.format(confusion_matrix(y_val,y_predict_log))\n",
    "print '***'*15"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 结果一般般"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 266,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "********* Logistic回归 默认参数 *********\n",
      "logloss of each fold is:  [-0.68518519 -0.71296296 -0.68518519 -0.75471698 -0.72641509]\n",
      "cv logloss is:  -0.712893081761\n",
      "*********************************************\n"
     ]
    }
   ],
   "source": [
    "# 无参数交叉验证\n",
    "loss = cross_val_score(lr, X_train, y_train, cv=5, scoring='accuracy')  # neg_log_loss    \n",
    "print '***'*3,'Logistic回归 默认参数', '***'*3\n",
    "print 'logloss of each fold is: ', -loss\n",
    "print 'cv logloss is: ', -loss.mean()\n",
    "print '***'*15"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 265,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUh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mEpgtNRLgQ3AT9q1PyMiicHpagKD5iEic0Tk34LzJwBHwhna\nmN6w4mBM6D6kdVyjucHX1wDfV9V5qvpMu/avADcFp9+hdUyczxLYYwC4lcANnIwZVKw4GBO6J4Hp\nwbGt8oHfAu8DPxORN0TkjyJyYZv2/yBwNdJoAreePCgi7xI4Mb1aRCYBF6jq7gH9KYwJgQ2fYUwf\niMhXgC8TuLeGF/ihqha2eT8TWKiqf+ik7z3AH4ID6xkzqFhxMMYY04EdVjLGGNOBFQdjjDEdWHEw\nxhjTgRUHY4wxHVhxMMYY04EVB2OMMR38f1Yp2mwaqYvrAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xe80a1d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# plot CV 误差曲线图\n",
    "test_means = grid.cv_results_['mean_test_score']\n",
    "test_stds = grid.cv_results_['std_test_score']\n",
    "train_means = grid.cv_results_['mean_train_score']\n",
    "train_stds = grid.cv_results_['std_train_score']\n",
    "# plot\n",
    "num_C_s = len(C_s)\n",
    "num_penaltys = len(penaltys)\n",
    "test_scores = np.array(test_means).reshape(num_C_s, num_penaltys) \n",
    "train_scores = np.array(train_means).reshape(num_C_s, num_penaltys) \n",
    "test_stds = np.array(test_stds).reshape(num_C_s, num_penaltys) \n",
    "train_stds = np.array(train_stds).reshape(num_C_s, num_penaltys) \n",
    "\n",
    "x_axis = np.log10(C_s)\n",
    "for i, value in enumerate(penaltys):\n",
    "    plt.errorbar(x_axis, test_scores[:,i], yerr=test_stds[:,i], label='{} test'.format(value))\n",
    "    plt.errorbar(x_axis, train_scores[:,i], yerr=train_stds[:,i], label='{} train'.format(value))\n",
    "plt.legend()\n",
    "plt.xlabel('log(C)')\n",
    "plt.ylabel('neg-logloss')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 199,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "分类结果报告 LinearSVC(C=1.0, class_weight=None, dual=True, fit_intercept=True,\n",
      "     intercept_scaling=1, loss='squared_hinge', max_iter=1000,\n",
      "     multi_class='ovr', penalty='l2', random_state=None, tol=0.0001,\n",
      "     verbose=0):\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "          0       0.74      0.72      0.73        60\n",
      "          1       0.66      0.69      0.67        48\n",
      "\n",
      "avg / total       0.71      0.70      0.70       108\n",
      "\n",
      "\n",
      "矩阵:\n",
      "[[43 17]\n",
      " [15 33]]\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# 线性SVM\n",
    "from sklearn.svm import LinearSVC\n",
    "from sklearn.metrics import classification_report, confusion_matrix\n",
    "SVC1 = LinearSVC().fit(X_train_part,y_train_part)\n",
    "# 在校验集上测试，并估计模型性能\n",
    "y_predict = SVC1.predict(X_val)\n",
    "print '分类结果报告 {}:\\n{}\\n'.format(SVC1,classification_report(y_val,y_predict))\n",
    "print '矩阵:\\n{}\\n'.format(confusion_matrix(y_val,y_predict))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 200,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def fit_grid_point_Linear(C, X_train, y_train, X_val, y_val):\n",
    "    SVC2 = LinearSVC(C=C)\n",
    "    SVC2 = SVC2.fit(X_train, y_train)\n",
    "    \n",
    "    accuracy = SVC2.score(X_val, y_val)\n",
    "    \n",
    "    print('accuracy: {}'.format(accuracy))\n",
    "    return accuracy\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 226,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "accuracy: 0.731481481481\n",
      "accuracy: 0.722222222222\n",
      "accuracy: 0.731481481481\n",
      "accuracy: 0.75\n",
      "accuracy: 0.731481481481\n",
      "accuracy: 0.703703703704\n",
      "****************************************\n",
      "最优时精准度:  0.75\n",
      "最优时 C:  3.98107170553\n",
      "****************************************\n"
     ]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lxn/OHBU7vGzLKmJsx9xxwBwLNFw\nSqSkKDmI5O83wPa5WlxbA3cCLwIjzOx/zGysme2w1PjHiN1I6xJtKd80s78TC9N3mNk2wIbu/kpR\nX4VIHlQ+Q6QJzOw04HiiF8h3wLXuPmGp728EdHH3+5bzs78A7ssV6xMpKUoOIiJSh6aVRESkDiUH\nERGpQ8lBRETqUHIQEZE6lBxERKQOJQcREanj/wP+uTvCImdPYwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xed2f710>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 生成参数C\n",
    "C_s = np.logspace(-3,3,6)\n",
    "accuracy_s = []\n",
    "for i, oneC in enumerate(C_s):\n",
    "    tmp = fit_grid_point_Linear(oneC, X_train,y_train, X_val, y_val)\n",
    "    accuracy_s.append(tmp)\n",
    "print '****'*10\n",
    "print '最优时精准度: ',max(accuracy_s)\n",
    "print '最优时 C: ',C_s[accuracy_s.index(max(accuracy_s))]\n",
    "print '****'*10\n",
    "x_axis = np.log10(C_s)\n",
    "plt.plot(x_axis, np.array(accuracy_s), 'b-')\n",
    "plt.legend()\n",
    "plt.xlabel('log(C)')\n",
    "plt.ylabel('accuracy')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 与Logistic回归比较，\n",
    "# 线性SVM明显优于Logistic回归，整体的预测命中率达到75%.，而Logistic回归72%左右，虽然没高多少。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 256,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# RBF核SVM\n",
    "from sklearn.svm import SVC\n",
    "def fit_grid_point_RBF(C, gamma, X_train, y_train, X_val, y_val):\n",
    "    # 在训练集上用SVC训练\n",
    "    SVC3 = SVC(C=C, kernel='rbf', gamma=gamma)\n",
    "    SVC3 = SVC3.fit(X_train, y_train)\n",
    "    # 在校验集上返回accuracy\n",
    "    accuracy = SVC3.score(X_val, y_val)\n",
    "    print 'accuracy: ', accuracy \n",
    "    return accuracy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 254,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('accuracy: ', 0.44444444444444442)\n",
      "('accuracy: ', 0.44444444444444442)\n",
      "('accuracy: ', 0.44444444444444442)\n",
      "('accuracy: ', 0.44444444444444442)\n",
      "('accuracy: ', 0.44444444444444442)\n",
      "('accuracy: ', 0.70370370370370372)\n",
      "('accuracy: ', 0.70370370370370372)\n",
      "('accuracy: ', 0.44444444444444442)\n",
      "('accuracy: ', 0.44444444444444442)\n",
      "('accuracy: ', 0.44444444444444442)\n",
      "('accuracy: ', 0.70370370370370372)\n",
      "('accuracy: ', 0.75)\n",
      "('accuracy: ', 0.57407407407407407)\n",
      "('accuracy: ', 0.44444444444444442)\n",
      "('accuracy: ', 0.44444444444444442)\n",
      "('accuracy: ', 0.7407407407407407)\n",
      "('accuracy: ', 0.67592592592592593)\n",
      "('accuracy: ', 0.57407407407407407)\n",
      "('accuracy: ', 0.44444444444444442)\n",
      "('accuracy: ', 0.44444444444444442)\n",
      "('accuracy: ', 0.75)\n",
      "('accuracy: ', 0.67592592592592593)\n",
      "('accuracy: ', 0.57407407407407407)\n",
      "('accuracy: ', 0.44444444444444442)\n",
      "('accuracy: ', 0.44444444444444442)\n",
      "********************************************************************************\n",
      "max:  0.75\n",
      "best C and gamma:  (3.1622776601683791, 0.17782794100389229)\n",
      "********************************************************************************\n"
     ]
    }
   ],
   "source": [
    "# 生成参数\n",
    "C_s = np.logspace(-2,3,5)\n",
    "gamma_s = np.logspace(-2,3,5)\n",
    "accuracy_s = []\n",
    "params = [(oneC,gamma) for oneC in C_s for gamma in gamma_s]\n",
    "for param in params:\n",
    "        temp = fit_grid_point_RBF(param[0], param[1], X_train_part, y_train_part, X_val, y_val)\n",
    "        accuracy_s.append(temp)\n",
    "print '****'*20\n",
    "print 'max: ',max(accuracy_s)\n",
    "print 'best C and gamma: ',params[accuracy_s.index(max(accuracy_s))]   \n",
    "print '****'*20"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 效果跟线性SVM差不多。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 257,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEICAYAAAC0+DhzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzs3XlYVdX6wPHvYkZBUUFQRHHAARAl\n5wnBWdMGS838OWWWQzZZ2c1u0/VqanrLcioVy9JulnVLc04kE3NGBScUZwZlnqezfn8cxIGDHoTj\nBs76PM95OmzX2vvlaPs9e++13iWklCiKoijK7Sy0DkBRFEWpeFRyUBRFUYpRyUFRFEUpRiUHRVEU\npRiVHBRFUZRiVHJQFEVRilHJQVEURSlGJQdFURSlGJUcFEVRlGKstA7gQTk7O0tPT0+tw1AURalU\nDh06dENK6XK/dpU2OXh6enLw4EGtw1AURalUhBAXjWmnbispiqIoxajkoCiKohSjkoOiKIpSjEoO\niqIoSjEqOSiKoijFqOSgKIqiFGOS5CCEWCmECBNCvFvCn08WQoQUvo4KIZYLIayEEJdu297aFLEp\niqIo91fu8xyEEEMBSyllFyHEKiGEl5Ty7O1tpJRLgaWF7T8Hvgb8gHVSyhnlHZOiPDRxEXD8R3Bp\nCX7DQQitI1IqGSklaTn5JGXkkpiRS1JmLgnp+v8mZuSRlJGLaw1bXu/XwqRxmGISXCDwQ+H7bUB3\n4KyhhkIId8BVSnlQCDEFGCyECAKOAy9KKfPvav8C8AJAw4YNTRC6ojyAnHSI2AC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lZSY9I\nmjvo+CdJnkY6i2T5yr2SXiC5Mf0LSRcCH4mIXYW2wqwGnj7DrA6Sbge+RrIi1xFgTUT0DPrzc4AF\nEdE9xLnfArrTiQLNTihODmZmluFhJTMzy3ByMDOzDCcHMzPLcHIwM7MMJwczM8twcjAzs4z/AfoI\nsjOZ1FJSAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xf018dd8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "x_axis = np.log10(C_s)\n",
    "accuracy_s1 = np.array(accuracy_s).reshape(len(C_s), len(gamma_s))\n",
    "for j, gamma in enumerate(gamma_s):    \n",
    "    plt.plot(x_axis, np.array(accuracy_s1[:,j]),label='Test-log(gamma: {})'.format(gamma))\n",
    "plt.legend()\n",
    "plt.xlabel('log(C)')\n",
    "plt.ylabel('accuracy')\n",
    "plt.show()   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
